package com.dhecp.project.flowable.extend;

import com.dhecp.common.utils.StringUtils;
import org.flowable.bpmn.model.ExtensionAttribute;

/**
 * @ClassName ExtensionAttributeUtils
 * @Description TODO
 * @Author alula
 * @Date 2020-05-14 11:35
 */
public class ExtensionAttributeUtils {
    public static ExtensionAttribute generate(String key, String val){
        ExtensionAttribute ea = new ExtensionAttribute();
        ea.setNamespace("http://www.fzdhsoft.com/");
        ea.setName(key);
        ea.setNamespacePrefix("custom");
        ea.setValue(StringUtils.isEmpty(val)? "": val);
        return ea;
    }
}
